package com.serviceImpl;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bean.ProductionPlanFood;
import com.mapper.ProductionPlanFoodMapper;
import com.service.ProductionPlanFoodService;

/**
 * @author  author : 张鹏
 * @date createTime：2018年1月23日 下午1:23:45 
 * @Description: 该类的功能描述
 */
@Service
public class ProductionPlanFoodServiceImpl implements ProductionPlanFoodService{
	@Resource
	private ProductionPlanFoodMapper planFoodMapper;

	@Override
	public int createNewProductionPlanFood(ProductionPlanFood planFood) {
		return planFoodMapper.insert(planFood);
	}

	@Override
	public List<ProductionPlanFood> getByProductionPlanId(int productionPlanId) {
		// TODO Auto-generated method stub
		return planFoodMapper.selectByProductionPlanId(productionPlanId);
	}
	
	@Override
	public List<ProductionPlanFood> getProductionPlanFoodAndSumQuantity() {
		// TODO Auto-generated method stub
		return planFoodMapper.selectSumQuantityGroupByFoodId();
	}

	

}
